The International Organization for Standardization (ISO) has adopted a standard (ISO/IEC 13818-1) that addresses the combining of one or more xe2x80x9celementary streamsxe2x80x9d of video and audio, as well as other data, into single or multiple streams suitable for storage or transmission. The ISO/IEC 13818-1 standard, hereinafter referred to as the xe2x80x9cMPEG-2 Systemsxe2x80x9d standard, is described in detail in the ISO draft document xe2x80x9cGeneric Coding of Moving Pictures and Associated Audioxe2x80x9d, ISO/IEC JTC1/SC29/WG11 N0801 ( Nov. 13, 1994), which is incorporated herein in its entirety by reference.
The MPEG-2 Systems standard defines an individual coded video, audio or other coded bitstream as an xe2x80x9celementary streamxe2x80x9d. The contents of an elementary stream may be broken into a sequence of discrete units, in which case the elementary stream is structured as a Packetized Elementary Stream (PES). The individual units, or packets, are known as PES packets, which can be of large and variable size. The MPEG-2 Systems standard defines generic structures for PES packet formats and specifies particular rules for creating PESs from digital video and audio elementary streams. Allowance is made for creating PESs for private data formats, i.e., data formats not defined by the MPEG-2 Systems standard.
The MPEG-2 Systems standard defines two methods of creating a multiplex of PESs. In a Program Stream (PS), all components in the multiplex are assumed to belong to a single xe2x80x9cProgramxe2x80x9d, that is, a collection of elementary streams which may sensibly be presented as a unity to a user, all components being referenced to a common time base, together with certain coordinating control information. PES packets from component PESs are multiplexed by PES packet. The PS is rigidly structured so that at most one PES of a specified format may carry a private data elementary stream.
In a Transport Stream (TS), the components of the multiplex may belong to many programs. Each PES is assigned a xe2x80x9cpacket identifierxe2x80x9d (PID). A sequence of packets identified by the same value of the PID field represents a single service component, typically a video or an audio component, or a user data component. The PES packets are broken into small, fixed-size units called transport packets, which may be multiplexed with transport packets from other PESs. The Transport Stream is transmitted at a constant rate, the transport rate, which is sufficient to accommodate the bandwidth requirements of all components carried within the Transport Stream. Since the transport rate may, either momentarily or in aggregate, exceed the bandwidth requirements of the constituent component, the MPEG-2 Systems standard has reserved PID 0xc3x971FFF as the xe2x80x9cnull PIDxe2x80x9d. Packets in this PID are xe2x80x9cnull packetsxe2x80x9d and do not carry any component. An MPEG decoder may discard them with impunity.
Coordination and control of the PESs and the Programs in the TS is managed via control data called Program Specific Information (PSI). PSI is structured as a set of tables according to a section format which differs from and is incompatible with the PES packet. The defined tables include the following:
A Program Association Table (PAT) is carried in PID 0, which is reserved exclusively for this purpose. The PAT identifies the Programs or services available via a program_number field, and, for each service, identifies the PID carrying the PMT applicable to that service.
A Program Map Table (PMT) for each service is carried in a PID identified within the PAT. The PMT identifies all the components belonging to the service and may provide additional information describing the components.
A Conditional Access Table (CAT) is carried in PID 1, which is reserved exclusively for this purpose. The CAT identifies PIDs carrying authorization streams for decoders implementing different conditional access systems. This information may include Entitlement Control Messages (ECMs) or Entitlement Management Messages (EMMs) used for encryption and authorization.
In addition, the Digital Video Broadcasting (DVB) committee has defined a number of additional tables for transport of Service Information (SI), including a Service Definition Table (SDT).
Thus, a Transport Stream can be understood as a multiplex of service components combined with descriptive service control information. However, the MPEG-2 Systems standard does not define how the Transport Stream multiplex is to be formed.
It is desirable to be able to combine two or more transport streams into a single transport stream that contains all of the components of the source transport streams. A problem encountered in combining transport streams is that the transport stream PIDs associated with one source stream typically conflict with the PIDs associated with one or more other source streams. Other identifying information, such as the program_number, assigned to a service may also conflict with that assigned to a service in another transport stream. Additionally, multiplexing two transport streams may cause embedded timing information, such as the Program Clock Reference (PCR), to be rendered inaccurate.
The above and other problems are solved by the multi-service transport multiplexing apparatus and method of the present invention. The present invention defines a process for creating a transport stream by addition of services, one at a time, to a pre-existing transport stream multiplex. The invention provides a capability for building a common set of service control information from the service control information tables of the individual streams being combined that avoids PID conflicts.
Accordingly, apparatus for multiplexing transport streams includes first and second transport demultiplexers for demultiplexing first and second input transport streams to their respective service components and service control information tables. Each demultiplexer filters the respective service components and service control information tables according to a particular filter set that specifies PID processing actions. A processor coupled to the first and second demultiplexers comprises means for examining the first and second service control information tables to determine whether any PID of one of the first and second transport streams overlaps or conflicts with any PID of the other of the first and second transport streams. The processor further includes means for generating output service control information tables from the first and second service control information tables that have been modified to avoid any overlapping or conflicting PIDs. The processor further provides the first and second filter sets to the first and second demultiplexers based upon the output service control information tables. A transport remultiplexer coupled to the processor and the first and second demultiplexers multiplexes the output service control information tables and the filtered first and second service components to provide an output transport stream.
According to an aspect of the invention, the processor changes or discards PIDs that overlap or conflict in the input transport streams.
According to another aspect of the invention, an encoder is combined with a transport multiplexer to provide an encoder/multiplexer. The encoder encodes a program source to provide a local transport stream. The transport multiplexer multiplexes the local transport stream with an input transport stream to provide an output transport stream. First and second encoder/multiplexers are series coupled wherein the output transport stream of the first encoder/multiplexer is coupled to provide the input transport stream to the multiplexer of the second encoder/multiplexer. Additional encoder/multiplexers can be series coupled to provide a daisy-chain configuration. In this manner, a general solution to the generation of a multi-service transport stream can be provided from the multiple local streams. In a preferred embodiment, a bypass circuit couples the input transport stream directly to the output transport stream which is activated in the event of failure of a given encoder/multiplexer.
According to another aspect of the invention, one or more redundant encoder/multiplexers can be connected in series at the end of a daisy-chain configuration to provide a hot-spare redundant mode of operation. The redundant encoder/multiplexer monitors the input transport stream to determine whether a failure has occurred in an upstream encoder/multiplexer. Upon a failure, the program source associated with the failed encoder/multiplexer can be switched to the redundant encoder/multiplexer which encodes the program source to provide a redundant local transport stream for multiplexing with the input transport stream.
In accordance with the present invention, a method of transport stream multiplexing includes receiving first and second transport streams, wherein each stream comprises a multiplex of service components and service control information, and demultiplexing the received transport streams to provide first and second demultiplexed transport streams. First and second service control information is extracted from the respective first and second demultiplexed streams and a determination is made whether any overlap or conflict exists between the first and second service control information. Output service control information is generated from the first and second service control information modified to avoid any overlap or conflict. The demultiplexed streams are filtered according to the output service control information. The output service control information and the filtered demultiplexed streams are then multiplexed to provide an output transport stream.
While the preferred embodiments are described with reference to MPEG-2 Systems standard Transport Streams, the principles of the present invention are intended to encompass the multiplexing of any data streams that comprise fixed length packets and have a self-contained directory structure which describes the multiplex. Thus, while the term xe2x80x9ctransport streamxe2x80x9d is used herein to denote a Transport Stream as defined by the MPEG-2 Systems standard, the principles of the present invention are also applicable to systems using similar transport structures such as Asynchronous Transfer Mode (ATM) systems.
The principles of the present invention also apply to a configuration in which an output of the last multiplexer in the chain is provided as the first transport stream to the first multiplexer in the chain to form a ring, and in which each multiplexer is extended to provide a feedback path to the encoder for relaying information that is passed around the ring concerning the bandwidth requirements of all other participating encoders, in order to provide bandwidth allocation by statistical multiplexing.
According to another aspect of the invention, an optimal multiplexing method is provided which allows buffers to be two packets in depth. Accordingly, for a plurality of buffers, each buffer associated with a packetized data stream, packets are received at respective buffer input rates. The buffers are serviced at a service rate at least equal to a sum of the buffer input rates. For each buffer, once a full packet has been received therein, a time interval until that buffer is expected to reach its buffer depth is determined. The buffer having the least time interval is then serviced first, such that overflow of the buffers is avoided.